package com.example.mymessagequeue.mqclient;

import java.io.IOException;

public class ConnectionFactory {
    // broker server 的 ip 地址
    private String host;

    // broker server 的端口号
    private int port;

    // 访问 broker server 的哪个虚拟主机.
    // private String virtualHostName;
    // private String username;
    // private String password;

    public Connection newConnection() throws IOException {
        return new Connection(host, port);
    }


    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
